{{define "todo"}}
<h1><strogn>{{.who}}</strogn>的TODO</h1>
<div class="row-fluid">
	<div class="span7">
		<!-- dropdown menu -->

{{if .IsLook}}
{{else}}
		<div class="btn-group card-title">
			<ul class="list-inline">
				<li><button onclick="todo_all_done();" class="btn btn-primary" style="">全部标记为 完成</button></li>
				<li><button onclick="todo_all_undone();" class="btn btn-primary" style="" >全部标记为 未完成</button></li>
				<li><button onclick="todo_clean();" class="btn btn-primary" style="">清除所有已完成TODO</button></li>
			</ul>
		</div>
		{{end}}
		<div  id="todo_list">
			
		</div>
	</div>
{{if .IsLook}}
{{else}}
	<div class="span5" id="side_board">
		<div id="todo_box">
			<div id="side_container" >
				<h2 class="side_board">添加一个新的TODO:</h2>
				<form class="form-horizontal" id="todo_form">
					<div class="control">
						<textarea name="text" id="todo_add_text" placeholder="请输入TODO内容" rows="4" cols="30"></textarea>
						<input name="level" id="todo_add_level" type="text" class="hide" value="0"/>
					</div>
					<div class="line"></div>
					<div id="todo_more_option" class="form-inline" style="height:48px;">
						<!--更多选项-->
						<div class="btn-group" id="set_level">
							<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
							TODO等级: <div class="btn-group" id="todo_level">1</div>
							<span class="caret"></span>
							</button>
							<ul class="dropdown-menu">
								<li><a href="javascript:set_level(1);">1</a></li>
								<li><a href="javascript:set_level(2);">2</a></li>
								<li><a href="javascript:set_level(3);">3</a></li>
								<li><a href="javascript:set_level(4);">4</a></li>
								<li><a href="javascript:set_level(5);">5</a></li>
								<li><a href="javascript:set_level(6);">6</a></li>
							</ul>
						</div>
					</div>
					<div>
						<button id="btn_todo_add" class="btn pull-right btn-primary">添加</button>
					</div>
				</form>
			</div>
		</div>
	</div>
{{end}}
</div>
{{end}}